namespace C1.Win.C1FlexGrid
{
    using C1.Win.C1FlexGrid.Util.Styles;
    using System;
    using System.Collections;

    internal class CellStyleEnumerator : IEnumerator
    {
        private int _index;
        private ArrayList _styles;

        internal CellStyleEnumerator(ArrayList styles)
        {
            this._styles = styles;
            this._index = -1;
        }

        bool IEnumerator.MoveNext()
        {
            this._index++;
            return (this._index < this._styles.Count);
        }

        void IEnumerator.Reset()
        {
            this._index = -1;
        }

        object IEnumerator.Current
        {
            get
            {
                return new CellStyle((Style) this._styles[this._index]);
            }
        }
    }
}

